package com.yida.admin;

import java.io.IOException;
import java.lang.ProcessBuilder.Redirect;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.support.MultipartFilter;

import com.yida.service.serverphoto;

import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;

@Controller
public class adminPhotoinput {
	
	@Autowired
	public serverphoto service;

	
	@RequestMapping("/admin/photoinput")
	public String photo(Integer id,String name, @RequestPart("file") MultipartFile[] files) {
		
		boolean result  =   service.insertphotoup(id, name, files);
		
		
		
	return  "redirect:/admin/photos?id="+id;	
}
	
}